package com.hskn.hss.module.alarmcar.vo;

import com.hskn.hss.core.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.poi.ss.usermodel.IndexedColors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AlarmCarChartsExcelVO implements Serializable {

    private static final long serialVersionUID = 1L;
    private String depId;
    @Excel(name = "车牌号", align = Excel.Align.CENTER, height = 18, width = 16)
    private String carName;
    @Excel(name = "所属机构", align = Excel.Align.CENTER, height = 18, width = 24)
    private String depName;

    private String alarmTime;
    @Excel(name = "合计报警(次)", align = Excel.Align.CENTER, height = 18, width = 16, color = IndexedColors.DARK_RED,cellType = Excel.ColumnType.NUMERIC)
    private Integer allCount;
    /**
     * 离线
     */
    @Excel(name = "离线(次)", align = Excel.Align.CENTER, height = 18, width = 16, color = IndexedColors.DARK_YELLOW,cellType = Excel.ColumnType.NUMERIC)
    private Integer lxCount = 0;
    /**
     * 漏油
     */
    @Excel(name = "漏油(次)", align = Excel.Align.CENTER, height = 18, width = 16, color = IndexedColors.DARK_YELLOW,cellType = Excel.ColumnType.NUMERIC)
    private Integer lyCount = 0;
    /**
     * 超速
     */
    @Excel(name = "超速(次)", align = Excel.Align.CENTER, height = 18, width = 16, color = IndexedColors.DARK_YELLOW,cellType = Excel.ColumnType.NUMERIC)
    private Integer csCount = 0;



    public AlarmCarChartsExcelVO() {
    }
    public List<Object> getResList(){
        List<Object> resList=new ArrayList<>();
        if (allCount!=null) {
            resList.add(allCount);
        }else {
            resList.add(0);
        }
        if (lxCount!=null) {
            resList.add(lxCount);
        }else {
            resList.add(0);
        }
        if (lyCount!=null) {
            resList.add(lyCount);
        }else {
            resList.add(0);
        }
        if (csCount!=null) {
            resList.add(csCount);
        }else {
            resList.add(0);
        }
        return resList;
    }
}
